/**
 * Created with IntelliJ IDEA.
 * User: ajhin
 * Date: 3/22/14
 * Time: 2:04 PM
 * To change this template use File | Settings | File Templates.
 */
package com.societyGames.codeAlong.state.codeExercise.model.testCase
{
import flash.utils.ByteArray;

public class FullyResetState extends TestCaseControllerState implements ISelectable, IExecutable
{
  public function FullyResetState(testCaseController:TestCaseController)
  {
    super(testCaseController);
  }

  override public function enter():void
  {
    _testCaseController._resetAllTestCases();
    _testCaseController.selectCase(0);
    _testCaseController._successCount = 0;
  }

  public function execute(executeByteArray:ByteArray):void
  {
    _testCaseController.selectCase(0);
    _testCaseController._executeByteArray = executeByteArray;
    _testCaseController._stateMachine.gotoState(_testCaseController._waitForCanExecuteState);
  }

  public function select(index:int):void
  {
    _testCaseController._selectCase(index);
  }
}
}
